String csv = String.Join( Environment.NewLine, data.Select(d => $"{d.Key};{d.Value};") ); System.IO.File.WriteAllText(pathToCsv, csv);